package com.ssy.lingxi.contract.repository;

import com.ssy.lingxi.contract.entity.ContractOuterRecordDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 合同外部流转记录
 * @author 伍将
 * @date 2021/2/3
 * @version 2.0.0
 */
public interface ContractOuterRecordRepository extends JpaRepository<ContractOuterRecordDO, Long>, JpaSpecificationExecutor<ContractOuterRecordDO> {

    /**
     * 根据合同id查询外部流转记录，并按操作时间排序
     * @author 伍将
     * @date 2021/2/7
     * @param contractId: 合同id
     * @return 外部流转记录列表
     **/
    List<ContractOuterRecordDO> findAllByContractIdOrderByOperateTime(Long contractId);
}
